package me.keiwu.user.dao;

import me.keiwu.user.domain.UserMedal;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

import java.util.List;

/**
 * Created by kei on 30/01/2018.
 */
public interface UserMedalDao extends JpaRepository<UserMedal, Long>, JpaSpecificationExecutor<UserMedal> {


    List<UserMedal> findAllByUserId(Long userId);

    UserMedal findByUserIdAndMedalId(Long userId, Integer medalId);

}
